<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>会员中心</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">
  <link rel="stylesheet"  th:href="@{/wxui/lib/weui.min.css}">
  <link rel="stylesheet"  th:href="@{/wxui/css/jquery-weui.css}">
  <link rel="stylesheet"  th:href="@{/wxui/css/style.css}">
</head>
<body ontouchstart>
<!--主体-->
<div class='weui-content'>
  <div class="wy-center-top">
    <div class="weui-media-box weui-media-box_appmsg"   style="margin: 0 auto;width: 220px;">
      <div class="weui-media-box__hd"><img class="weui-media-box__thumb radius" th:src="${session.user.headimg==null ? '/wxui/images/rqsc/3.jpg':session.user.headimg}"  alt=""></div>
      <div class="weui-media-box__bd" >
        <h4 class="weui-media-box__title user-name" th:text="${session.user.username}"></h4>
        <p class="user-grade weui-media-box__title " style="color: #FFFFFF;" th:text="'等级:'+${session.user.userLevelName}"></p>
      </div>
    </div>
  </div>
  <div class="weui-panel weui-panel_access">
    <div class="weui-panel__hd">
      <a href="/orderInfo/frontStage/lookOrders?state=" class="weui-cell weui-cell_access center-alloder">
        <div class="weui-cell__bd wy-cell">
          <div class="weui-cell__hd"><img th:src="@{/wxui/images/center-icon-order-all.png}" alt="" class="center-list-icon"></div>
          <div class="weui-cell__bd weui-cell_primary"><p class="center-list-txt">全部订单</p></div>
        </div>
        <span class="weui-cell__ft"></span>
      </a>   
    </div>
    <div class="weui-panel__bd">
      <div class="weui-flex">
        <div class="weui-flex__item">
          <a href="/orderInfo/frontStage/lookOrders?state=0" class="center-ordersModule">
            <span class="state1" ></span>
            <div class="imgicon"><img th:src="@{/wxui/images/center-icon-order-dfk.png}" /></div>
            <div class="name">待付款</div>
          </a>
        </div>
        <div class="weui-flex__item">
          <a href="/orderInfo/frontStage/lookOrders?state=1" class="center-ordersModule">
            <span class="state2" ></span>
            <div class="imgicon"><img th:src="@{/wxui/images/center-icon-order-dfh.png}" /></div>
            <div class="name">待发货</div>
          </a>
        </div>
        <div class="weui-flex__item">
          <a href="/orderInfo/frontStage/lookOrders?state=2" class="center-ordersModule">
            <span class="state3"></span>
            <div class="imgicon"><img th:src="@{/wxui/images/center-icon-order-dsh.png}" /></div>
            <div class="name">待收货</div>
          </a>
        </div>
        <div class="weui-flex__item">
          <a href="/orderInfo/frontStage/lookOrders?state=3" class="center-ordersModule">
            <span class="state4"></span>
            <div class="imgicon"><img th:src="@{/wxui/images/center-icon-order-dpj.png}"  /></div>
            <div class="name">待评价</div>
          </a>
        </div>
      </div>
    </div>
  </div>
  
  <div class="weui-panel">
        <div class="weui-panel__bd">
          <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
              <a class="weui-cell weui-cell_access" href="news_list.html">
                <div class="weui-cell__hd"><img th:src="@{/wxui/images/center-icon-sc.png}" alt="" class="center-list-icon"></div>
                <div class="weui-cell__bd weui-cell_primary">
                  <p class="center-list-txt">新闻列表</p>
                </div>
                <span class="weui-cell__ft"></span>
              </a>
              <a class="weui-cell weui-cell_access" href="/receiveAddress/frontStage/goAddressListPage">
                <div class="weui-cell__hd"><img th:src="@{/wxui/images/center-icon-dz.png}" alt="" class="center-list-icon"></div>
                <div class="weui-cell__bd weui-cell_primary">
                  <p class="center-list-txt">地址管理</p>
                </div>
                <span class="weui-cell__ft"></span>
              </a>
              <a class="weui-cell weui-cell_access" href="/user/frontstage/editPwd">
                <div class="weui-cell__hd"><img th:src="@{/wxui/images/center-icon-dlmm.png}"  alt="" class="center-list-icon"></div>
                <div class="weui-cell__bd weui-cell_primary">
                  <p class="center-list-txt">密码修改</p>
                </div>
                <span class="weui-cell__ft"></span>
              </a>
              <a class="weui-cell weui-cell_access" href="/frontstage/loginExit">
                <div class="weui-cell__hd"><img th:src="@{/wxui/images/center-icon-out.png}" alt="" class="center-list-icon"></div>
                <div class="weui-cell__bd weui-cell_primary">
                  <p class="center-list-txt">退出账号</p>
                </div>
                <span class="weui-cell__ft"></span>
              </a>
            </div>
          </div>
        </div>
      </div>
</div>

<!--底部导航-->
<div class="foot-black"></div>
<div class="weui-tabbar wy-foot-menu">
  <a href="/index" class="weui-tabbar__item">
    <div class="weui-tabbar__icon foot-menu-home"></div>
    <p class="weui-tabbar__label">首页</p>
  </a>
  <a href="/type/front/types" class="weui-tabbar__item">
    <div class="weui-tabbar__icon foot-menu-list"></div>
    <p class="weui-tabbar__label">分类</p>
  </a>
  <a href="/shopcar/front/myCar" class="weui-tabbar__item">
    <!-- <span class="weui-badge" style="position: absolute;top: -.4em;right: 1em;"></span> -->
    <div class="weui-tabbar__icon foot-menu-cart"></div>
    <p class="weui-tabbar__label">购物车</p>
  </a>
  <a href="/user/frontstage/goUserCenterPage" class="weui-tabbar__item weui-bar__item--on">
    <div class="weui-tabbar__icon foot-menu-member"></div>
    <p class="weui-tabbar__label">我的</p>
  </a>
</div>
<script th:src="@{/wxui/lib/jquery-2.1.4.js}"></script>
<script th:src="@{/wxui/lib/fastclick.js}"></script>
<script type="text/javascript" th:src="@{/wxui/js/jquery.Spinner.js}"></script>
<script>
  $(function() {
    FastClick.attach(document.body);
      countState(0,'.state1');
      countState(1,'.state2');
      countState(2,'.state3');
      countState(3,'.state4');

  });


  function countState(state,stateClass) {
      $.ajax({
          type:"post",
          url:"/orderInfo/frontStage/countState",
          data:{
              "state":state
          },
          dataType:"json",
          success:function (data) {
              if(data.data!=0){
                  $(stateClass).addClass("weui-badge").css("position","absolute").css("top","5px").css("right","10px").css("font-size","10px").html(data.data)
              }
          }
      })
  }
</script>
<script th:src="@{/wxui/js/jquery-weui.js}"></script>
</body>
</html>
